
Rem
bbdoc: Movement System.
about: Required component: TPosition.
endrem
Type TMovementSystem Extends TEntityProcessingSystem

	Field _positionMapper:TComponentMapper
	
	
	Method Initialize()
		_positionMapper = TComponentMapper.Create(New TPositionComponent, _world)
		RegisterComponent(New TPositionComponent)
	End Method
	
	
	Method ProcessEntity(e:TEntity)
		Local p:TPositionComponent = TPositionComponent(_positionMapper.Get(e))
		
		'set previous position to current position.
		p.Update()
	End Method
	
End Type
